using System;
using System.Linq.Expressions;
using Daemon.Model;
namespace Daemon.Infrustructure.EF.Executor
{
    public static class GridExecutor
    {
        public static string GetIdentityName<TDomainEntity, TIdentity>()
            where TDomainEntity : IGridEntity<TIdentity>
        {
            return (((Expression<Func<TDomainEntity, TIdentity>>)(r => r.Id)).Body as MemberExpression).Member.Name;
        }
    }
}